import url from '@/const/apiURL'
import { colunms } from '@/const/colunms'
import global from '@/util/global'

export function queryField () {
    return {
        material: [
            { name: '物料名称', type: 'query', prop: 'goodsCode', placeholder: "物料名称" }
        ],
        order: [
            { name: '订单号', type: 'text', prop: 'orderNoLike', placeholder: "订单号" }
        ],
        model: [
            { name: global.modelName, type: 'text', prop: 'modelNameLike', placeholder: global.modelName },
            { name: '物料类型', type: 'select', prop: 'materialType', placeholder: "物料类型", dataUrl: url.TYPE_USABLE_URL, label: 'typeName', value: 'typeCode' }
        ],
        modelName: [
            { name: global.modelName, type: 'text', prop: 'modelNameLike', placeholder: global.modelName },
            { name: '名称', type: 'text', prop: 'nameLike', placeholder: "名称" },
            { name: '物料类型', type: 'select', prop: 'materialType', placeholder: "物料类型", dataUrl: url.TYPE_USABLE_URL, label: 'typeName', value: 'typeCode' },
        ],
        goods: [
            { name: global.modelName, type: 'text', prop: 'modelNameLike', placeholder: global.modelName }
        ],
        goodsQuery: [
            { name: global.modelName, type: 'query', prop: 'modelCode', placeholder: global.modelName, url: url.MODEL_LIST_URL, columns: colunms().modelColumns }
        ],
        customer: [
            { name: '客户名称', type: 'text', prop: 'customerNameLike', placeholder: "客户名称" }
        ],
        step: [
            { name: '工序名称', type: 'text', prop: 'stepNameLike', placeholder: "工序名称" }
        ],
        purchase: [
            { name: '采购单号', type: 'text', prop: 'orderNoLike', placeholder: "采购单号" }
        ]
    }
}
